import request from '@/utils/request';

export async function getCustomerByPage(params: any) {
  return request('/api/basicData/getCustomerByPage', {
    method: 'POST',
    data: params,
  });
}

export async function addCustomer(params: any) {
  return request('/api/basicData/addCustomer', {
    method: 'POST',
    data: params,
  });
}

export async function updateCustomer(params: any) {
  return request('/api/basicData/updateCustomer', {
    method: 'POST',
    data: params,
  });
}

export async function delCustomer(params: any) {
  return request('/api/basicData/delCustomer', {
    method: 'POST',
    data: params,
  });
}

export async function customerExport(params: any) {
  return request('/api/basicData/customerExport', {
    method: 'POST',
    data: params,
    responseType: 'blob',
  });
}

export default { getCustomerByPage, addCustomer, updateCustomer, delCustomer, customerExport };
